Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exclude-matchers support for template & matchers #2218

Merged
merged 3 commits into from
Jun 24, 2022
Merged

Conversation

Ice3man543
Copy link
Member

@Ice3man543 Ice3man543 commented Jun 23, 2022

Proposed changes

Closes #2082 by adding an -em -exclude-matchers flag. The syntax is <template-id>:<matcher-name>. Wildcard in form of '*' character can be used for either field which will be used for ignoring all templates with either that template-id or matcher-name.

$ echo http://0.0.0.0:8000 | ./nuclei -id http-missing-security-headers -silent | wc
      17
$ echo http://0.0.0.0:8000 | ./nuclei -id http-missing-security-headers -silent -em http-missing-security-headers:cross-origin-opener-policy | wc
      16

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@Ice3man543 Ice3man543 self-assigned this Jun 23, 2022
@Ice3man543 Ice3man543 added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Jun 23, 2022
@Ice3man543 Ice3man543 linked an issue Jun 23, 2022 that may be closed by this pull request
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ echo http://0.0.0.0:8000 | ./nuclei -id http-missing-security-headers -silent | wc
      17
$ echo http://0.0.0.0:8000 | ./nuclei -id http-missing-security-headers -silent -em http-missing-security-headers:cross-origin-opener-policy | wc
      16

@ehsandeep ehsandeep merged commit 7875b06 into dev Jun 24, 2022
@ehsandeep ehsandeep deleted the exclude-matchers branch June 24, 2022 17:39
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Jun 24, 2022
@Bisstocuz
Copy link
Contributor

Hi, maybe it needs a standard yaml field name? Just like:

	// TemplateID is the ID of the template for matcher
	TemplateID string `yaml:"-"`
	// ExcludeMatchers is a list of excludeMatchers items
	ExcludeMatchers *excludematchers.ExcludeMatchers `yaml:"exclude-matchers,omitempty"`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to exclude results based on matcher names
4 participants